import request from '@/utils/request'

// 帖子分页
export function getLunTanPage(params) {
    return request({
        url: `/xm/forum/page`,
        method: 'get',
        params,
        jy: true
    })
}

//发布帖子
export function fabuTieZi(data) {
    return request({
        url: '/xm/forum/save',
        method: 'POST',
        data,
        jy: true
    })
}
//保存评论
export function saveCommen(data) {
    return request({
        url: '/xm/forum/saveComment',
        method: 'POST',
        data,
        jy: true
    })
}

//获取用户基本信息
export function getUserId(params) {
    return request({
        url: '/assess/common/get/basic/in/formation',
        method: 'get',
        params,
        jy: true
    })
}
//获取帖子详情
export function getforumId(forumId) {
    return request({
        url: `/xm/forum/forumDetails/${forumId}`,
        method: 'get',
        jy: true
    })
}
//获取搜游人员
export function userOneStep() {
    return request({
        url: '/assess/common/query/user',
        method: 'get',
        jy: true
    })
}

//删除帖子
export function deleteTieZi(forumId) {
    return request({
        url: `/xm/forum/deleteForum/${forumId}`,
        method: 'DELETE',
        jy: true
    })
}
//删除评论
export function deletePingLun(commentId) {
    return request({
        url: `/xm/forum/deleteComment/${commentId}`,
        method: 'DELETE',
        jy: true
    })
}